<div class="text-center">
	<h1 translate="ADMIN.NEW_USERS"></h1>

	<loading-indicator hide="vm.signups"></loading-indicator>

	<uib-pagination max-size="10" items-per-page="vm.itemsPerPage" total-items="vm.totalItems" ng-model="vm.currentPage" ng-change="vm.getSignups()" previous-text="{{ 'PAGER.PREVIOUS' | translate }}" next-text="{{ 'PAGER.NEXT' | translate }}" boundary-links="true" first-text="{{ 'PAGER.FIRST' | translate }}" last-text="{{ 'PAGER.LAST' | translate }}"></uib-pagination>

	<div class="col-lg-10 col-lg-push-1">
		<table class="table text-left" ng-show="vm.signups">
			<tr>
				<th class="text-left" translate="TORRENTS.DATE"></th>
				<th class="text-left" translate="TORRENTS.NAME"></th>
				<th class="text-left" style="width: 500px;" translate="ADMIN.IP_HOST"></th>
				<th class="text-left" style="width: 150px;" translate="ADMIN.SECURITY_CHECK"></th>
			</tr>
			<tr ng-repeat="signup in vm.signups">
				<td>{{ ::signup.added }}</td>
				<td><user user="::signup.user"></user></td>
				<td><a href="" ui-sref="admin-search({ip: signup.ip})">{{ ::signup.ip }}</a> (<b>{{ ::signup.hostname }}</b>)</td>
				<td>
					<span ng-if="::signup.log_mail == 0 && signup.log_ip == 0" translate="ADMIN.NO_IP_MAIL_MATCHES"></span>
					<button ng-if="::signup.log_ip > 0 && signup.level == 0" ui-sref="admin-search({ip: signup.ip})" class="btn btn-xs btn-warning" translate="ADMIN.IP_MATCHES" translate-value-x="{{ ::signup.log_ip }}"></button>
					<button ng-if="::signup.log_ip > 0 && signup.level >= 1" ui-sref="admin-search({ip: signup.ip})" class="btn btn-xs btn-danger" translate="ADMIN.IP_MATCHES" translate-value-x="{{ ::signup.log_ip }}"></button>
					<button ng-if="::signup.log_mail > 0" ui-sref="admin-search({email: signup.email})" class="btn btn-xs btn-warning" translate="ADMIN.MAIL_MATCHES" translate-value-x="{{ ::signup.log_mail }}"></button>
				</td>
			</tr>
		</table>
	</div>

	<div class="clearfix"></div>

	<uib-pagination max-size="10" items-per-page="vm.itemsPerPage" total-items="vm.totalItems" ng-model="vm.currentPage" ng-change="vm.getSignups()" previous-text="{{ 'PAGER.PREVIOUS' | translate }}" next-text="{{ 'PAGER.NEXT' | translate }}" boundary-links="true" first-text="{{ 'PAGER.FIRST' | translate }}" last-text="{{ 'PAGER.LAST' | translate }}"></uib-pagination>
</div>
